<ion-view view-title="Selecciona una fecha de asistencia">
    <ion-content class="padding">
        <ion-refresher pulling-text="Arrastra para recargar..." on-refresh="doRefresh()">
        </ion-refresher>
        <form novalidate name="attendanceDatesForm">
            <label class="item item-input item-stacked-label">
                <span class="input-label">Fecha inicial</span>
                <input ng-model="data.dates.StartDate" type="date">
            </label>
            <label class="item item-input item-stacked-label">
                <span class="input-label">Fecha final</span>
                <input ng-model="data.dates.EndDate" type="date">
            </label>
            <button type="button" class="button button-block button-positive" ng-click="search(data)">
                Buscar
            </button>
        </form>
        <div class="list" ng-show="attendanceSummaries">
            <ion-list>
                <ion-item class="item-remove-animate item-icon-right" ng-repeat="summary in attendanceSummaries" type="item-text-wrap"
                          ng-class="attendanceSummaryClass(summary)">
                    <a class="item-content" href="#/tab/postattendance/{{summary.AttendanceSummaryId}}/{{summary.StartTime | date:'dd-MM-yyyy'}}/{{summary.Met}}/{{summary.IsPosted}}/{{summary.Comments}}">
                        <h2>{{summary.StartTime | date:'dd/MM/yyyy' }}</h2>
                        <p ng-show="summary.Met">
                            Asistieron: {{summary.PresentCount}} / {{summary.TotalCount}}
                        </p>
                        <p ng-show="summary.Comments">
                            No hubo grupo
                        </p>
                        <i class="icon ion-chevron-right icon-accessory"></i>
                    </a>

                </ion-item>
            </ion-list>
        </div>
    </ion-content>
</ion-view>
